package in.muton.edushare.wicket.converters.choicerenderers;

import org.apache.wicket.markup.html.form.IChoiceRenderer;

import com.edushare.common.vo.Schedules;

public class FrequencyChoiceRenderer implements IChoiceRenderer<Integer> {
	private static final long serialVersionUID = 3319826908185016791L;

	public Object getDisplayValue(Integer object) {
		switch (object) {
		case Schedules.EVENT_ONCE_ONLY:
			return "Once Only";
		case Schedules.EVENT_DAILY:
			return "Daily";
		case Schedules.EVENT_WEEKLY:
			return "Every Week";
		case Schedules.EVENT_MONTHLY:
			return "Every Month";
		}
		return null;
	}

	public String getIdValue(Integer object, int index) {
		return object.toString();
	}
}
